This document provides a brief description of the rulerset features of the VText library. Rulersets control the formatting of text paragraphs.
VText is a source code library for developers only.
Axioms
• Every paragraph has one and only one rulerset associated with it.
• Rulersets are independent of the stylesets that hold font and style information.
Rulersets
Rulerset data members include:
name name of rulerset
direction left_to_right or right_to_left,
justification leading, trailing, centered, or filled justification
ruler_start delta relative to text image margins and direction
ruler_end delta relative to text image margins and direction
ruler_indent for first line of paragraph. Delta relative to text image margins and direction.
space_before_line space before every line of paragraph
space_after_line space after every line of paragraph
space_before_paragraph additional space before first line of paragraph
space_after_paragraph additional space after last line of paragraph
tabs list of tabs for the rulerset
Tabs
Data members of tab records include:
orientation leading, trailing, centered, aligned
location location of tab relative to ruler_start
repeating_every if non zero, the interval between tab repetitions. If zero, there is only one tab stop
delimiter for aligned tabs, the character to align the text on
Directions
It is natural for languages that have a right to left direction to be layed out using a right to left direction. This means that on a rulerset with right to left direction:
ruler_start is the right side of the text image,
ruler_end is the left side of the text image,
sequential tabs proceed right to left, and
a tab at position "0" would refer to the right side of the ruler.
When considering justification, tabs, and the rulerset direction, "leading" and "trailing" mean left or right dependent on the rulerset direction.
When runs of characters with differing directions occur in the same paragraph, the display ordering of that text also considers tabs. Specifically, a run of mixed directional text associated with one tab is ordered independently of text associated with another tab.
Examples
This document uses several different rulersets. Some of the rulersets used include those in the "Demo/RulerSet" menu. Others include rulersets that were created using AppleScripts and subsequently saved in the rulerset flavors associated with this file. The first release of VText does not have a GUI widget for user manipulation of rulers. Nevertheless, it is easy for developers to create custom rulersets for their applications.
Justification
Many of the paragraphs in this document have leading and filled justification.
Center justification is also available.
Center justification is great for poems.
Center justification is great for headlines.
Center justification is great to divide sections.
Trailing justification is also available.
Trailing justification is also great to divide sections.
Trailing justification is great for date stamps.
Trailing justification is great for time stamps.
Indented, justified paragraphs:
Indented paragraphs are the paragraphs many of us are familiar with from our writing composition classes. Indented paragraphs are the paragraphs many of us are familiar with from our writing composition classes. Indented paragraphs are the paragraphs many of us are familiar with from our writing composition classes. Indented paragraphs are the paragraphs many of us are familiar with from our writing composition classes.
Indented paragraphs are the paragraphs many of us are familiar with from our writing composition classes. Indented paragraphs are the paragraphs many of us are familiar with from our writing composition classes. Indented paragraphs are the paragraphs many of us are familiar with from our writing composition classes. Indented paragraphs are the paragraphs many of us are familiar with from our writing composition classes.
Hanging, justified paragraphs:
Hanging text blocks are useful for bullet lists and other special formatting requirements. Hanging text blocks are useful for bullet lists and other special formatting requirements. Hanging text blocks are useful for bullet lists and other special formatting requirements. Hanging text blocks are useful for bullet lists and other special formatting requirements.
Hanging text blocks are useful for bullet lists and other special formatting requirements. Hanging text blocks are useful for bullet lists and other special formatting requirements. Hanging text blocks are useful for bullet lists and other special formatting requirements. Hanging text blocks are useful for bullet lists and other special formatting requirements.
Paragraph spacing:
Many of the paragraphs in this document have additional space before and or after the paragraph. This paragraph also has additional spacing between individual lines. Use line spacing to provide double spacing and triple spacing -- any spacing. Many of the paragraphs in this document have additional space before and or after the paragraph. This paragraph also has additional spacing between individual lines. Use lines spacing to provide double spacing and triple spacing -- any spacing.
Data alignment:
VText tabs are general purpose as the following lines illustrate. Much of the text below will appear as jibberish -- the fonts required to display the text correctly aren't installed in the current system folder.
leading centered aligned.tab lagging
◊—·†¬Â«ÂÍ Â—„“ «‰—‚†«‰÷«»◊.Üˉ ÊÁ«Í…†«‰ƒ†Œ—…
¡Ïµº ÷––ƒ Ω·√À.«∞Ω¯ ¬‰∫Û
¯fi‡÷œ ÷Œ÷ΔΔÂΔÏfi Úfi¯›ÍŸ.˘Ÿ¯«ÍŸ ÙœΔ‚ΔÂΔ¯
àÍî‘ íÜêS àÍèèÇ….ëOêi íxÇÍÇÈ
dev botlh joj.duv qav
‚ÂÒÚË ˆÂÌÚ Ó‚Ì˚È.‚ÔÂfi‰s ÓÒÚ‡Ú¸
Here are the same lines of text with a right to left ruler. Note that the ordering of the tabs is right to left and that tab stops are relative to the ruler start -- the right side.